package project;
import java.util.*;
public class SchoolSystem {

 int[ ] maxStudent=new int[3];    
    int[ ] currentStudent=new int[3];  
 public SchoolSystem(int big, int medium, int small) { //2345
  for(int i=0;i<3;i++) maxStudent[i]=50;
  currentStudent[0]=maxStudent[0]-big;
  currentStudent[1]=maxStudent[1]-medium;
  currentStudent[2]=maxStudent[2]-small;
  
 }
 public Boolean addStudent(int stuType) {
  for(int i=0;i<3;i++) {
  if(stuType==i+1) {
   if(maxStudent[i]>currentStudent[i]) {
    currentStudent[i]++;
    return true;
   }
   else break;
  }}
  return false; 
 }
 public void print(boolean a) {
  System.out.print(a);
 }
 public static ArrayList<Integer> parse2(String input) {
    String[] str = input.split(",");
    ArrayList<Integer> List=new ArrayList<Integer>();
    for(int i = 0;i < str.length; i++)
     List.add(Integer.valueOf(str[i]));
    return List;
    }
}
public boolean delStudent(Integer stuType) {
	if(currentStudent[stuType-1]!=0) {
		switch(stuType) {
		case -1:
		currentStudent[0]--;
		break;
		case -2:
			currentStudent[1]--;
			break;
		case -3:
			currentStudent[2]--;
			break;
		}
		return true;
	}
	else {
		return false;
	}
	
}
